Skip to content

Instantly share code, notes, and snippets.

@jarek-przygodzki
jarek-przygodzki / waitForEnter.java
Last active September 22, 2026 23:36
Wait for enter key pressed in Java
/*
* Be beware http://stackoverflow.com/questions/4203646/system-console-returns-null
*/
public static void waitForEnter(String message, Object... args) {
Console c = System.console();
if (c != null) {
// printf-like arguments
if (message != null)
c.format(message, args);
c.format("\nPress ENTER to proceed.\n");
@mikesmullin
mikesmullin / qwen.sh
Created September 22, 2026 03:06
Qwen 3.8 27B on RTX 5090 at 90-120tps
llama-server \
--alias qwen3.8-27b-nvfp4-mtp-q8attn \
-m "$HOME/.lmstudio/models/utautako/Qwen3.8-27B-NVFP4-MTP-Q8attn-GGUF/Qwen3.8-27B-NVFP4-MTP-Q8attn.gguf" \
--mmproj "$HOME/.lmstudio/models/utautako/Qwen3.8-27B-NVFP4-MTP-Q8attn-GGUF/mmproj-Qwen3.8-27B-NVFP4-BF16.gguf" \
--spec-type draft-mtp \
--spec-draft-n-max 4 \
-ngl 99 \
-c 262144 \
@minimaxir
minimaxir / ur-prompt.md
Last active September 22, 2026 23:15
ur-prompt-20260919

Optimize the Rust and Python bindings in this Rust crate to its maximum potential. Specifically, you MUST make a breakthrough from this current implementation that uses modern concepts and knowledge as of 2026 to further improve this crate without causing ANY significant regressions.

First, before making any library changes, run the Rust and Python benchmarks (and any competitor benchmarks if applicable) to establish a True Performance Baseline for both speed and metric performance. Return the absolute and relative results to the True Performance Baseline to the user as a Markdown table.

Then, optimize the Rust and Python library code such that these benchmarks are atleast 1.2x faster from the True Performance Baseline; ideally as fast as possible, without any significant regressions on quality and prediction error. NEVER hack the benchmarks to accomplish this speed increase, only iterate on the library code. Ensure all benchmark iterations are independent, e.g. NEVER reuse a cache built in

@senko
senko / index.html
Last active September 22, 2026 22:55
Minecraft clone by Opus 5.5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>VoxelCraft</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap" rel="stylesheet">
<style>
@BrianLincoln
BrianLincoln / YTMLikesToPlaylist.md
Last active September 22, 2026 22:29
YouTube Music Likes to Playlist

Copy Likes to a playlist in YouTube Music

This is a very hacky solution to copy Liked songs to a playlist since YTM still doesn't have the functionality. I'm using this to copy songs out of YTM to another service, then unsubscribing. Thus, I won't be maintaining it (or ever using it again). It will only work while the YTM interface is the same as it is today (3/6/21) and will break once they make updates.

Steps to use:

  1. Create a new playlist
  2. Go to your Likes page (in chrome, on a desktop or laptop). Scroll to the bottom so all songs are loaded
  3. Open Chrome's dev tools (F12 on windows), go to the console
  4. Paste the script below. Edit the first line, replace "YOUR_PLAYLIST_NAME" with your playlist's name
  5. Press enter
@dvaupel
dvaupel / svt-av1_encoding_guide.md
Last active September 22, 2026 22:28
SVT-AV1 Encoding Guide

SVT-AV1 Encoding Guide

Open source encoders

  • AOMEnc[^4]. Developed by AOM, reference encoder with most features and highest quality.
  • SVT-AV1. Developed by Intel, production ready encoder with high performance and optimized for parallelism.
  • Rav1e. Developed by Mozilla/Xiph, used by Vimeo[^1].

Since all these tools are stil being actively developed, you should always use the newest versions and compile the standalone encoders yourself if necessary.

1980
1998
2000
2003
2004
2005
2006
2007
2008
2009

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@nikunjkareliya
nikunjkareliya / PlayerPrefsX.cs
Created January 24, 2016 11:25
ArrayPrefs2
// ArrayPrefs2 v 1.4
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public class PlayerPrefsX
{
static private int endianDiff1;
@stecman
stecman / write-to-tape.md
Last active September 22, 2026 22:05
Buffered write to LTO tape on linux

Writing to LTO tape with a text index and a memory buffer

This script is for writing to LTO tape on Linux with tar and producing a plain text index file. It uses a large memory buffer to keep the destination tape drive fed when the source drive can't consistently match the tape's write speed (eg. when there are a mix of small and large files).

This was written for a small, manually managed tape collection. It writes tape index information and tar listings as text to a file. This file can be stored separately, searched easily, and appended to the end of the tape if you want your tapes to be self-describing: